gtk4.git
17 years agoFree region also if its empty (we're taking ownership now)
Alexander Larsson [Mon, 9 Feb 2009 09:35:19 +0000 (10:35 +0100)]
Free region also if its empty (we're taking ownership now)

17 years agoMove unnecessary window copies to the right place
Alexander Larsson [Mon, 9 Feb 2009 08:28:30 +0000 (09:28 +0100)]
Move unnecessary window copies to the right place

This code got placed wrong, it should happen when processing updates
on the impl window so it affects the whole expose, not in begin_updates.

17 years agoRemove invalid source area from copy in move_region_on_impl
Alexander Larsson [Sun, 8 Feb 2009 12:35:17 +0000 (13:35 +0100)]
Remove invalid source area from copy in move_region_on_impl

There is no need to copy something that is already invalid and will
be marked as invalid in the destination anyway, so we remove this
area from the region to copy.

17 years agoMove GdkWindowRegionMove construction/destruction to separate functions
Alexander Larsson [Sun, 8 Feb 2009 12:17:37 +0000 (13:17 +0100)]
Move GdkWindowRegionMove construction/destruction to separate functions

17 years agoUse clearer names for GdkWindowRegionMove members
Alexander Larsson [Sun, 8 Feb 2009 12:13:56 +0000 (13:13 +0100)]
Use clearer names for GdkWindowRegionMove members

17 years agoqueue expose translations after the actual pixel copy
Alexander Larsson [Sun, 8 Feb 2009 12:10:42 +0000 (13:10 +0100)]
queue expose translations after the actual pixel copy

The expose translation is useful for tracking how outstanding
invalid (exposed on server) areas are copied, and how we need to
compensate for that on the client side to redraw the right area.

So, we should queue the translation at the time we actually move
the bits on the server side, not when moving the window on the
client side.

Also, clean up some naming of parameters.

17 years agoFix order of outstanding moves in queue
Alexander Larsson [Sun, 8 Feb 2009 08:00:57 +0000 (09:00 +0100)]
Fix order of outstanding moves in queue

The last added move should be done last, so we need to append moves
not prepend

17 years agoMake outstanding window moves work with the new model
Alexander Larsson [Sat, 7 Feb 2009 17:46:31 +0000 (18:46 +0100)]
Make outstanding window moves work with the new model

We now copy outstanding window moves directly on the window and
not to an intermediary pixmap, this means our previous code to
combine window copies was wrong (it relied on each copy not
destroying the source date).

Furthermore, we can't just remove all the update area from the
destination of the outstanding moves, as sometimes things get
copied into that area and then used as the source of another
copy.

We replace the previous window copy combining with a naive
version that just queues each move, just to get things right.
Further work to optimize copies is possible.

Also, we don't remove copy destinations that are used as source
for later copies.

We also clean up the memory management by not having
move_region_on_impl taking ownership of the passed in region.

17 years agoDon't clear background on no exposure mask if NULL background pixmap set
Alexander Larsson [Thu, 5 Feb 2009 19:20:23 +0000 (20:20 +0100)]
Don't clear background on no exposure mask if NULL background pixmap set

This is the same as background None in X, i.e. never draw the background.

17 years agoDon't event process updates for foreign windows
Alexander Larsson [Thu, 5 Feb 2009 16:02:14 +0000 (17:02 +0100)]
Don't event process updates for foreign windows

17 years agoDon't touch private->parent after its been change
Alexander Larsson [Thu, 5 Feb 2009 16:01:21 +0000 (17:01 +0100)]
Don't touch private->parent after its been change

The backend reparent may change private->parent, so we must use
the old saved value.

17 years agoClear background on expose with no EXPOSURE_MASK
Alexander Larsson [Thu, 5 Feb 2009 14:38:51 +0000 (15:38 +0100)]
Clear background on expose with no EXPOSURE_MASK

Apps that set no exposure mask rely on the system clearing things
to the window background, so we need to do this ourselves.

Also, don't do this on foreign windows, as they are not controlled
by us. In fact don't do exposes on foreign windows either.

17 years agoCall backend show() in gdk_window_show even if window is mapped
Alexander Larsson [Thu, 5 Feb 2009 13:53:59 +0000 (14:53 +0100)]
Call backend show() in gdk_window_show even if window is mapped

This is required for the GtkSocket code, as it shows the plug child
even though the current cached state is (wrongly) that its already
mapped.

This makes blink work for non-local case in testsocket.

17 years agoRefactor background clearing code so we can clear a general region
Alexander Larsson [Thu, 5 Feb 2009 13:53:07 +0000 (14:53 +0100)]
Refactor background clearing code so we can clear a general region

17 years agoBe more explicit about when to flush moves
Alexander Larsson [Thu, 5 Feb 2009 09:47:11 +0000 (10:47 +0100)]
Be more explicit about when to flush moves

Also makes the non-doublebuffered case work better by flushing before we
call _gdk_windowing_window_process_updates_recurse.

17 years agoDestroy native children when recursing from a destroy on a virtual window
Alexander Larsson [Thu, 5 Feb 2009 08:55:39 +0000 (09:55 +0100)]
Destroy native children when recursing from a destroy on a virtual window

Native descendants of a virtual children are not automatically destroyed
with the parent as if it was a native window, so we need to handle
the native recursion tracking manually in _gdk_window_destroy_hierarchy()

17 years agoOnly translate native motion events to motion events
Alexander Larsson [Wed, 4 Feb 2009 19:23:51 +0000 (20:23 +0100)]
Only translate native motion events to motion events

Crossing events don't have the device field, which we would like to
pass on, so only do motion events from motion events.

17 years agoDon't set the background for input only window
Alexander Larsson [Wed, 4 Feb 2009 19:21:02 +0000 (20:21 +0100)]
Don't set the background for input only window

This is not allowed and will cause X errors.

17 years agoFix assert, it was checking the wrong window
Alexander Larsson [Wed, 4 Feb 2009 15:36:33 +0000 (16:36 +0100)]
Fix assert, it was checking the wrong window

We keep the update freeze count in the impl_window, not in
child windows.

17 years agoWorkaround X11 clipping bug
Alexander Larsson [Wed, 4 Feb 2009 15:23:15 +0000 (16:23 +0100)]
Workaround X11 clipping bug

It turns out that XCopyArea handling of obscured source regions is
buggy. It clears the destination area even outside the GC clip
region. We work around this for the pixmap->window case as that
can happen in gtk+ and is easy to work around.

X Bug report at:
http://lists.freedesktop.org/archives/xorg/2009-February/043318.html

17 years agoEnable custom event masks for native windows
Alexander Larsson [Wed, 4 Feb 2009 10:22:54 +0000 (11:22 +0100)]
Enable custom event masks for native windows

Some apps really need to set custom event masks on native child windows,
for example emacs sets the event masks with gdk, but then reads out
the raw X events via a filter, so gdk event emulation doesn't work for that.

When we get motion or button events we map back from the event position and
window to the toplevel before doing anything, because a toplevel native window
could e.g. overlap a child window or whatever.

17 years agoFilter out all native grab/ungrab events with detail INFERIOR
Alexander Larsson [Tue, 3 Feb 2009 21:51:27 +0000 (22:51 +0100)]
Filter out all native grab/ungrab events with detail INFERIOR

These are generated when we get an implicit grab on a native
child window, and we can't filter them with _has_grab() because
they are sent before the button press event where we detect
the implicit grab.

This makes clicks work in the flash plugin again

17 years agoMake owner_events grabs work again, use the pointer window, not the event window
Richard Hult [Tue, 3 Feb 2009 20:52:21 +0000 (21:52 +0100)]
Make owner_events grabs work again, use the pointer window, not the event window

17 years agoDon't ignore all events when inactive, only clicks
Richard Hult [Tue, 3 Feb 2009 17:47:09 +0000 (18:47 +0100)]
Don't ignore all events when inactive, only clicks

17 years agoRelax the check for ignoring events above the content view
Richard Hult [Tue, 3 Feb 2009 15:14:33 +0000 (16:14 +0100)]
Relax the check for ignoring events above the content view

17 years agoRemove workaround for missing enter events on newly popped up windows
Richard Hult [Tue, 3 Feb 2009 15:01:31 +0000 (16:01 +0100)]
Remove workaround for missing enter events on newly popped up windows

The reason for the issue was that we got entered/exited events for the
title bar buttons. Now we properly ignore those instead.

17 years agoRemove re-declared variable
Richard Hult [Tue, 3 Feb 2009 14:28:19 +0000 (15:28 +0100)]
Remove re-declared variable

17 years agoRemove unused code and fix some indentation
Richard Hult [Tue, 3 Feb 2009 12:45:06 +0000 (13:45 +0100)]
Remove unused code and fix some indentation

17 years agoButton press and release can share the same fill_button_event call
Richard Hult [Tue, 3 Feb 2009 10:57:32 +0000 (11:57 +0100)]
Button press and release can share the same fill_button_event call

17 years agoRemove tracking of "current mouse window", this is handled in the common code now
Richard Hult [Mon, 2 Feb 2009 18:50:51 +0000 (19:50 +0100)]
Remove tracking of "current mouse window", this is handled in the common code now

17 years agoRemove old cursor setting and make it work with client-side windows
Richard Hult [Mon, 2 Feb 2009 18:45:41 +0000 (19:45 +0100)]
Remove old cursor setting and make it work with client-side windows

17 years agoUpdate for latest changes in the common code for grab tracking
Richard Hult [Mon, 2 Feb 2009 18:14:07 +0000 (19:14 +0100)]
Update for latest changes in the common code for grab tracking

17 years agoIgnore all events if the app is not active
Richard Hult [Mon, 2 Feb 2009 14:51:11 +0000 (15:51 +0100)]
Ignore all events if the app is not active

17 years agoWhen breaking grabs on deactivation, the unset should be implicit
Richard Hult [Mon, 2 Feb 2009 14:44:13 +0000 (15:44 +0100)]
When breaking grabs on deactivation, the unset should be implicit

17 years agoUse _gdk_display_unset_has_*_grab in break_all_grabs()
Richard Hult [Mon, 2 Feb 2009 14:36:26 +0000 (15:36 +0100)]
Use _gdk_display_unset_has_*_grab in break_all_grabs()

17 years agoUse cooca to convert coordinats from event window to grab window instead of homegrown...
Richard Hult [Mon, 2 Feb 2009 13:46:47 +0000 (14:46 +0100)]
Use cooca to convert coordinats from event window to grab window instead of homegrown code

17 years agoReplace quartz specific keyboard grab code with common code
Richard Hult [Mon, 2 Feb 2009 13:22:37 +0000 (14:22 +0100)]
Replace quartz specific keyboard grab code with common code

17 years agoCast to avoid warning
Richard Hult [Mon, 2 Feb 2009 13:21:13 +0000 (14:21 +0100)]
Cast to avoid warning

17 years agoRemove unused variable
Richard Hult [Mon, 2 Feb 2009 13:20:52 +0000 (14:20 +0100)]
Remove unused variable

17 years agoUse the common pointer grab code instead of tracking it ourselves
Richard Hult [Mon, 2 Feb 2009 13:11:46 +0000 (14:11 +0100)]
Use the common pointer grab code instead of tracking it ourselves

17 years agoUse isKeyWindow instead of isMainWindow for the non-click-through check
Richard Hult [Sat, 31 Jan 2009 20:32:11 +0000 (21:32 +0100)]
Use isKeyWindow instead of isMainWindow for the non-click-through check

17 years agoApply non-click-through policy on unfocused windows even if the app is active
Richard Hult [Sat, 31 Jan 2009 20:25:41 +0000 (21:25 +0100)]
Apply non-click-through policy on unfocused windows even if the app is active

17 years agoFix coords returned by _gdk_windowing_window_get_pointer, fixes scribble demo
Richard Hult [Sat, 31 Jan 2009 20:16:27 +0000 (21:16 +0100)]
Fix coords returned by _gdk_windowing_window_get_pointer, fixes scribble demo

17 years agoRemove unused remainders from the old implicit grab code
Richard Hult [Fri, 30 Jan 2009 09:06:12 +0000 (10:06 +0100)]
Remove unused remainders from the old implicit grab code

17 years agoGet implicit grabs working
Richard Hult [Thu, 29 Jan 2009 16:27:20 +0000 (17:27 +0100)]
Get implicit grabs working

17 years agoLeave AppKit events unhandled
Richard Hult [Thu, 29 Jan 2009 13:05:54 +0000 (14:05 +0100)]
Leave AppKit events unhandled

17 years agoUse event_type we already have instead of regetting it
Richard Hult [Thu, 29 Jan 2009 13:02:00 +0000 (14:02 +0100)]
Use event_type we already have instead of regetting it

17 years agoGet the correct root coordinates for events
Richard Hult [Thu, 29 Jan 2009 12:53:13 +0000 (13:53 +0100)]
Get the correct root coordinates for events

17 years agoReturn ignoring of native grab/ungrab events when we don't have a grab
Alexander Larsson [Tue, 3 Feb 2009 19:15:19 +0000 (20:15 +0100)]
Return ignoring of native grab/ungrab events when we don't have a grab

It turns out we really have to ignore grab/ungrab events or we'll
report double crossing events when we grab or ungrab.

However, we also can't ignore crossing events from grabs from other clients
as that leads to missed enter/leave events on e.g. alt-tab in metacity.

Fortunately we now track grabs very precisely, so we know with certainty
whether we have a grab at the time (serial) of the native crossing events,
and only if we do we ignore them.

17 years agoHandle crossing events with subwindows unknown to gdk
Alexander Larsson [Tue, 3 Feb 2009 11:24:30 +0000 (12:24 +0100)]
Handle crossing events with subwindows unknown to gdk

If we get crossing events with subwindow unexpectedly being NULL
that means there is a native subwindow that gdk doesn't know about.
We track these and forward them, with the correct virtual window
events inbetween.

This is important to get right, as metacity uses gdk for the frame
windows, but gdk doesn't know about the client windows reparented
into the frame.

17 years agoenable motion hints - use last sent request
Alexander Larsson [Mon, 2 Feb 2009 15:37:10 +0000 (16:37 +0100)]
enable motion hints - use last sent request

We were using the next request, but there is no guarantee
on is sent. This caused trouble in e.g. the handlebox dragging.

17 years agoMake sure we report grab broken on window destroy
Alexander Larsson [Mon, 2 Feb 2009 14:38:58 +0000 (15:38 +0100)]
Make sure we report grab broken on window destroy

17 years agoReport the steady state in gdk_display_pointer_is_grabbed
Alexander Larsson [Mon, 2 Feb 2009 14:37:02 +0000 (15:37 +0100)]
Report the steady state in gdk_display_pointer_is_grabbed

For instance if we grab the pointer and then check if its grabbed
so that we know to ungrab we don't care that the grab is not
yet active, so report the steady state (i.e. the last grab)

17 years agoMove implicit grab tracking totally to common code
Alexander Larsson [Mon, 2 Feb 2009 13:57:08 +0000 (14:57 +0100)]
Move implicit grab tracking totally to common code

17 years agoDon't send crossing events to destroyed windows
Alexander Larsson [Mon, 2 Feb 2009 11:50:18 +0000 (12:50 +0100)]
Don't send crossing events to destroyed windows

17 years agoNew approach for grab tracking code
Alexander Larsson [Sat, 31 Jan 2009 18:42:44 +0000 (19:42 +0100)]
New approach for grab tracking code

We try to track the exact grab state, i.e. whats valid on the client
now and whats comming soon via the xserver roundtrip (and when).

17 years agoRef windows during _gdk_x11_roundtrip_async
Alexander Larsson [Fri, 30 Jan 2009 13:14:16 +0000 (14:14 +0100)]
Ref windows during _gdk_x11_roundtrip_async

17 years agoFix up indentation
Alexander Larsson [Fri, 30 Jan 2009 11:30:16 +0000 (12:30 +0100)]
Fix up indentation

17 years agoMove bitfield in GdkWindowImplX11 to make struct more compact
Alexander Larsson [Fri, 30 Jan 2009 11:24:24 +0000 (12:24 +0100)]
Move bitfield in GdkWindowImplX11 to make struct more compact

17 years agoOnly sync the display if creating a native window implicitly
Alexander Larsson [Thu, 29 Jan 2009 18:52:12 +0000 (19:52 +0100)]
Only sync the display if creating a native window implicitly

17 years agoSync the display when creating a native window.
Alexander Larsson [Thu, 29 Jan 2009 16:36:17 +0000 (17:36 +0100)]
Sync the display when creating a native window.

This is needed because we want to be able to use the xid immediately
even from another process or another connection to the display.

17 years agoDon't warn about unexpected events on foreign windows
Alexander Larsson [Thu, 29 Jan 2009 13:30:48 +0000 (14:30 +0100)]
Don't warn about unexpected events on foreign windows

We don't really control these events so its not wrong per se
to have them generate stuff we don't expect.

17 years agoUpdate clip region etc, when creating a foreign window
Alexander Larsson [Thu, 29 Jan 2009 13:29:23 +0000 (14:29 +0100)]
Update clip region etc, when creating a foreign window

17 years agoFix typo in gdk_window_input_shape_combine_region
Alexander Larsson [Thu, 29 Jan 2009 13:06:54 +0000 (14:06 +0100)]
Fix typo in gdk_window_input_shape_combine_region

17 years agoMake gdk_window_get_toplevel() for CHILD window with root as parent
Alexander Larsson [Wed, 28 Jan 2009 15:37:56 +0000 (16:37 +0100)]
Make gdk_window_get_toplevel() for CHILD window with root as parent

Having GDK_WINDOW_CHILD windows with root as the parent apparently works,
and metacity uses it. The current gdk_window_get_toplevel() returns the
root window for that, which is wrong, so we check that explicitly.

17 years agoDon't mess with any events on the root window.
Alexander Larsson [Wed, 28 Jan 2009 12:41:12 +0000 (13:41 +0100)]
Don't mess with any events on the root window.

This causes all sorts of weirdness with pointer_over_window
being the rootwindow and then crashing gdk_window_get_toplevel() later.

With this metacity stops crashing madly.

17 years agoDon't crash if window->parent is NULL
Alexander Larsson [Wed, 28 Jan 2009 11:49:46 +0000 (12:49 +0100)]
Don't crash if window->parent is NULL

This happens for events on the root window.

17 years agoDon't recursively set bg none on the parent when e.g. moving children
Alexander Larsson [Tue, 27 Jan 2009 15:43:03 +0000 (16:43 +0100)]
Don't recursively set bg none on the parent when e.g. moving children

To avoid drawing the window background of other windows in the area
where the window was we set the bg to none recursively. However, this
is quite costly it the moved window has many siblings. Furthermore, it
is uncommon that siblings overlap, so this cost has little gain.

So, we only set bg None on the parent, which means that there will
be some more flicker in the uncommon case of overlapping siblings.

17 years agoSimplify do_move_region_bits_on_impl by removing unused arguments
Alexander Larsson [Tue, 27 Jan 2009 14:42:12 +0000 (15:42 +0100)]
Simplify do_move_region_bits_on_impl by removing unused arguments

17 years agoRemove_gdk_pixmap_set_as_backing etc, as this is not used anymore
Alexander Larsson [Tue, 27 Jan 2009 14:38:39 +0000 (15:38 +0100)]
Remove_gdk_pixmap_set_as_backing etc, as this is not used anymore

We don't copy from a window to a pixmap anymore, so all the code
for this can be removed.

17 years agoFix warning about XChangeProperty argument type
Alexander Larsson [Tue, 27 Jan 2009 14:12:50 +0000 (15:12 +0100)]
Fix warning about XChangeProperty argument type

17 years agoRemove unused code
Alexander Larsson [Tue, 27 Jan 2009 14:12:37 +0000 (15:12 +0100)]
Remove unused code

17 years agoFix warning about wrong type in assignment
Alexander Larsson [Tue, 27 Jan 2009 14:12:00 +0000 (15:12 +0100)]
Fix warning about wrong type in assignment

17 years agoFix warning due to typo
Alexander Larsson [Tue, 27 Jan 2009 14:11:39 +0000 (15:11 +0100)]
Fix warning due to typo

17 years agoRemove unused label
Alexander Larsson [Tue, 27 Jan 2009 14:11:21 +0000 (15:11 +0100)]
Remove unused label

17 years agoAvoid warnings about non-handled GDK_EVENT_LAST enum
Alexander Larsson [Tue, 27 Jan 2009 14:10:45 +0000 (15:10 +0100)]
Avoid warnings about non-handled GDK_EVENT_LAST enum

17 years agoFix setting of private->shaped when setting input shape
Alexander Larsson [Tue, 27 Jan 2009 13:57:37 +0000 (14:57 +0100)]
Fix setting of private->shaped when setting input shape

I.e. it should only be set/unset when setting ShapeBounding.

17 years agoDon't look for EXPOSE mask set to disable bg none setting
Alexander Larsson [Tue, 27 Jan 2009 13:51:21 +0000 (14:51 +0100)]
Don't look for EXPOSE mask set to disable bg none setting

We always set EXPOSE in the client-side-windows world, so this
doesn't make sense anymore.

17 years agoFix typos in X11 details of new OSX APIs
Alexander Larsson [Tue, 27 Jan 2009 13:10:00 +0000 (14:10 +0100)]
Fix typos in X11 details of new OSX APIs

17 years agoDon't ignore native CROSSING_GRAB/UNGRAB events
Alexander Larsson [Mon, 26 Jan 2009 19:50:56 +0000 (20:50 +0100)]
Don't ignore native CROSSING_GRAB/UNGRAB events

These are sent when someone else grabs the pointer, and we don't
want to miss these expose events. For instance, we missed enter
and leave events on alt-tab.

There were some issues with these wrt out-of-sync grab information
in the client, but that should now be handled. So, it should work
or at least be fixable if we find some bug.

17 years agoTrack pointer grabs on Xserver time
Alexander Larsson [Mon, 26 Jan 2009 19:38:20 +0000 (20:38 +0100)]
Track pointer grabs on Xserver time

After a successful grab/ungrab we wait for an xserver
roundtrip until we change the tracked grab in GdkDisplay.
This way that data is always up-to-date wrt events comming in.

17 years agoAdd _gdk_x11_roundtrip_async
Alexander Larsson [Mon, 26 Jan 2009 18:55:08 +0000 (19:55 +0100)]
Add _gdk_x11_roundtrip_async

17 years agoUpdate for changes in the paintable interface
Richard Hult [Mon, 26 Jan 2009 19:33:33 +0000 (20:33 +0100)]
Update for changes in the paintable interface

Get rid of invalidate_maybe_recurse and process_updates. Implement
_gdk_windowing_{before,after}_process_all_updates(), and keep track of
when we're inside process_all_updates in the common code so we know
when to flush windows. Implement
_gdk_windowing_window_process_updates_recurse by means of
setNeedsDisplayInRect: displayIfNeeded. Use the added window argument
in begin_paint_region to get the right window (the paintable is always
the impl window now).

17 years agoCall _gdk_window_process_updates_recurse() in drawRect instead of creating our own...
Richard Hult [Mon, 26 Jan 2009 19:29:51 +0000 (20:29 +0100)]
Call _gdk_window_process_updates_recurse() in drawRect instead of creating our own expose events

17 years agoRemove invalidate_maybe_recurse and process_updates from the paintable interface
Richard Hult [Mon, 26 Jan 2009 18:29:26 +0000 (19:29 +0100)]
Remove invalidate_maybe_recurse and process_updates from the paintable interface

Replace them with two new functions
_gdk_windowing_{before,after}_process_all_updates() that are called
around the guts of gdk_window_process_all_updates(). Add empty ones
for X11 (nothing more needed), quartz ones will be implemented next.

17 years agoExpose _gdk_window_process_updates_recurse for backends
Richard Hult [Mon, 26 Jan 2009 18:12:54 +0000 (19:12 +0100)]
Expose _gdk_window_process_updates_recurse for backends

We use this in the added windowing function
_gdk_windowing_window_process_updates_recurse. The X11 implementation
just calls _gdk_window_process_updates_recurse directly, but at least
quartz will need to do some more work.

17 years agoAdd a window argument to begin_paint_region in the paintable interface
Richard Hult [Mon, 26 Jan 2009 17:47:47 +0000 (18:47 +0100)]
Add a window argument to begin_paint_region in the paintable interface

The paintable itself is now the impl window, which can be different
from the window.

17 years agoSetup ->impl_window on the root window
Richard Hult [Sat, 24 Jan 2009 09:05:00 +0000 (10:05 +0100)]
Setup ->impl_window on the root window

17 years agoAdd gdk_windowing_window_get_next_serial
Richard Hult [Sat, 24 Jan 2009 09:03:25 +0000 (10:03 +0100)]
Add gdk_windowing_window_get_next_serial

17 years agoRemove gdk_keyboard_grab_info_libgtk_only which moved to the common code
Richard Hult [Sat, 24 Jan 2009 08:46:06 +0000 (09:46 +0100)]
Remove gdk_keyboard_grab_info_libgtk_only which moved to the common code

17 years agoAdd serial argument to _gdk_windowing_got_event
Richard Hult [Sat, 24 Jan 2009 08:43:55 +0000 (09:43 +0100)]
Add serial argument to _gdk_windowing_got_event

17 years agoFix gdk_window_has_no_impl typo
Alexander Larsson [Mon, 26 Jan 2009 14:45:17 +0000 (15:45 +0100)]
Fix gdk_window_has_no_impl typo

17 years agoOnly set cursors on toplevel.
Alexander Larsson [Mon, 26 Jan 2009 11:54:02 +0000 (12:54 +0100)]
Only set cursors on toplevel.

This fixes a problem where we used to set them on a native window, but we
never unset it becase when the pointer moved to another native window
we just set the cursor on that window. Always setting on the toplevel
fixes this.

17 years agoSwitch motion hint emulation to be serial based.
Alexander Larsson [Fri, 23 Jan 2009 20:07:53 +0000 (21:07 +0100)]
Switch motion hint emulation to be serial based.

For backends not supporting serials, just have
_gdk_windowing_window_get_next_serial return zero.

17 years agoRevert "Convert all pending X events in _gdk_events_queue"
Alexander Larsson [Fri, 23 Jan 2009 19:11:21 +0000 (20:11 +0100)]
Revert "Convert all pending X events in _gdk_events_queue"

This reverts commit 7cc15ec6ea1504133dfe6febbdb12615550bb966.

Its risky to convert all the events in a go like this, as it
increases the out-of-order issues. It also isn't a full solution
to the motion hint issue as it will only work for the events
we happen to convert. It would be better to use serials to
handle motion hinting.

17 years agoKeep track of the impl windows wrapper directly with a ref
Alexander Larsson [Fri, 23 Jan 2009 19:08:39 +0000 (20:08 +0100)]
Keep track of the impl windows wrapper directly with a ref

This is needed so that the ->wrapper of the impl window doesn't
go away while there are virtual windows referencing the impl
window.

17 years agoUngrab keyboard if virtual window is hidden or destroyed
Alexander Larsson [Fri, 23 Jan 2009 14:39:04 +0000 (15:39 +0100)]
Ungrab keyboard if virtual window is hidden or destroyed

17 years agoMove keyboard grab state tracking code to common code
Alexander Larsson [Fri, 23 Jan 2009 14:23:19 +0000 (15:23 +0100)]
Move keyboard grab state tracking code to common code

17 years agoMove keyboard grab info to common code
Alexander Larsson [Fri, 23 Jan 2009 14:05:44 +0000 (15:05 +0100)]
Move keyboard grab info to common code

This is the first stage in tracking keyboard grabs in the common code.
This lets us handle destroying or unmapping virtual window with a
keyboard grab.

17 years agoConvert all pending X events in _gdk_events_queue
Alexander Larsson [Fri, 23 Jan 2009 12:15:04 +0000 (13:15 +0100)]
Convert all pending X events in _gdk_events_queue

If we only convert the first then motion hint emulation won't
work since we don't see the next motion even until we've
fully handled this one.

However, this changes a behaviour that has been like this since
the mists of time. I don't know if it could cause other issues.
I haven't seen any yet though.